using System;
using System.Text;
using System.Collections.Generic;

using usm.SolDev.Common.Constants;

namespace usm.SolDev.DataBase.DataObjects
{
    /// <summary>
    ///     The user management data
    /// </summary>
    public class UserManagementData : DataObject
    {
        #region Private fields
        private List<UserInfoData> users;
        private List<GroupDataObject> groups;
        private List<Permissions> permissions;

        #endregion

        #region Constructors
        /// <summary>
        ///     Default constructor
        /// </summary>
        public UserManagementData () {}
        #endregion

        #region Public properties

        /// <summary>
        ///     Users list available into the database
        /// </summary>
        public List<UserInfoData> Users
        {
            get
            {
                if (users == null)
                {
                    users = new List<UserInfoData>();
                }

                return users; 
            }

            set { users = value; }
        }

        /// <summary>
        ///     A list of available groups in database
        /// </summary>
        public List<GroupDataObject> Groups
        {
            get
            {
                if (groups  == null )
                {
                    groups = new List<GroupDataObject>();
                }

                return groups;
            }

            set { groups = value; }
        }

        /// <summary>
        ///     A list of available permissions
        /// </summary>
        public List<Permissions> Permissions
        {
            get
            {
                if (permissions == null)
                {
                    permissions = new List<Permissions>();
                }

                return permissions;
            }

            set { permissions = value; }
        }
        #endregion
    }
}
